Java program to find maximum element in each row of the matrix